<%@page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<form:form modelAttribute="page" id="pagerForm" method="post"
	action="${ctx}/scheduler/list?navtabid=${navtabid}">
	<input type="hidden" name="pageNo" value="${page.pageNo}" />
	<input type="hidden" id="numPerPage" name="numPerPage" value="${page.numPerPage}" />
	<input type="hidden" name="orderBy" value="${page.orderBy}" />
	<input type="hidden" name="order" value="${page.order}" />
</form:form>
<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="${ctx}/scheduler/list?navtabid=${navtabid}"
		method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>用户名：<input type="text" name="name" value="" />
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">检索</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" target="dialog" href="${ctx}/scheduler/add?navtabid=${navtabid}" target="navTab"><span>添加</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="40"><input type="checkbox" class="checkboxCtrl"
					group="c1" /></th>
				<th orderField="NAME" 
					class=" ${page.orderBy eq 'NAME' ? page.order : '' }" >NAME</th>
				<th orderField="CLASS_DESCRIPT" 
					class=" ${page.orderBy eq 'CLASS_DESCRIPT' ? page.order : '' }" >CLASS_DESCRIPT</th>
				<th orderField="TRIGGER_TYPE" 
					class=" ${page.orderBy eq 'TRIGGER_TYPE' ? page.order : '' }" >TRIGGER_TYPE</th>
				<th orderField="TIME_EXPRESS" 
					class=" ${page.orderBy eq 'TIME_EXPRESS' ? page.order : '' }" >TIME_EXPRESS</th>
				<th orderField="START_TIME" 
					class=" ${page.orderBy eq 'START_TIME' ? page.order : '' }" >START_TIME</th>
				<th orderField="END_TIME" 
					class=" ${page.orderBy eq 'END_TIME' ? page.order : '' }" >END_TIME</th>
				<th orderField="REPEAT_TIME" 
					class=" ${page.orderBy eq 'REPEAT_TIME' ? page.order : '' }" >REPEAT_TIME</th>
				<th orderField="SPLIT_TIME" 
					class=" ${page.orderBy eq 'SPLIT_TIME' ? page.order : '' }" >SPLIT_TIME</th>
				<th orderField="STATUS" 
					class=" ${page.orderBy eq 'STATUS' ? page.order : '' }" >STATUS</th>
				<th orderField="MEMO" 
					class=" ${page.orderBy eq 'MEMO' ? page.order : '' }" >MEMO</th>
				<th orderField="CREATOR" 
					class=" ${page.orderBy eq 'CREATOR' ? page.order : '' }" >CREATOR</th>
				<th orderField="CREATE_DATE" 
					class=" ${page.orderBy eq 'CREATE_DATE' ? page.order : '' }" >CREATE_DATE</th>
				<th width="150px">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="item" items="${page.result}" varStatus="menu">
				<tr>
					<td><input type="checkbox" name="c1" value="" /></td>
				<td><c:out value='${item.name}'/></td>
				<td><c:out value='${item.classDescript}'/></td>
				<td><c:out value='${item.triggerType}'/></td>
				<td><c:out value='${item.timeExpress}'/></td>
				<td><c:out value='${item.startTime}'/></td>
				<td><c:out value='${item.endTime}'/></td>
				<td><c:out value='${item.repeatTime}'/></td>
				<td><c:out value='${item.splitTime}'/></td>
				<td><c:out value='${item.status}'/></td>
				<td><c:out value='${item.memo}'/></td>
				<td><c:out value='${item.creator}'/></td>
				<td><c:out value='${item.createDate}'/></td>
					<td>
					<a  class="btnDel" href="${ctx}/scheduler/delete/${item.id}"
						target="ajaxTodo" title="确定要删除吗?"  >删除</a>
					<a  class="btnEdit" href="${ctx}/scheduler/edit/${item.id}?navtabid=${navtabid}"
						target="dialog" title="修改">修改</a>
					<c:if test="${item.status=='enable'}">
						<a  class="btnDel" href="${ctx}/scheduler/stop/${item.id}"
						target="ajaxTodo" title="确定要停止?"  >停止</a>
					</c:if>
					<c:if test="${item.status=='disable'}">
							<a  class="btnDel" href="${ctx}/scheduler/start/${item.id}"
						target="ajaxTodo" title="确定要启动?"  >启动</a>
					</c:if>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
		<%@ include file="/commons/panelBar.jsp"%>
</div>
